package juntos.lbcv;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MySQL{

    static Connection connect;
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
   
    String host="lbcv.db.10868387.hostedresource.com";
    String  datab = "lbcv";
    String username ="lbcv";
    String password ="lbcV@2014";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();

    String url = "jdbc:mysql://" + host + ":3306/" + datab;

    Driver test = DriverManager.getDriver(url);
    // testing to make sure i'm using the correct
    //driver and further testing host
    System.out.println(test);
    connect = DriverManager.getConnection(url, username, password);

    System.out.println ("Connected to " + host);
    }
}